package com.gaoyi.crm.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.gaoyi.crm.constant.Constants;
import com.gaoyi.crm.util.NetworkUtil;
import com.gaoyi.crm.util.Utils;

public class NetworkBroadcastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Utils.changeNetStatus(NetworkUtil.isConnected() ? Constants.ONLINE : Constants.OFFLINE);
    }
}
